package com.paddyi.controller;

import com.paddyi.commons.http.HttpResult;
import com.paddyi.commons.qiniu.MyQiniu;
import com.paddyi.feignService.DocumentService;
import com.paddyi.model.Document;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.Date;

/**
 *  (Document)
 * @author paddy
 * @since  2019-08-05 06:40:35
 */
@RestController
@RequestMapping("document")
public class DocumentController extends BaseController{

	@Autowired
	private DocumentService documentService;


    /**
     * @return
     */    
	@PostMapping(value="/findPage")
	public String findPage() {
		String s = documentService.findAll();
		return s;
	}
	
    /**
     * 根据主键查询
     * @param id
     * @return
     */ 	
	@GetMapping(value="/findById")
	public HttpResult findById(@RequestParam Long id) {
		return HttpResult.ok(documentService.findById(id));
	}
}
